package com.example.fw;

import org.hibernate.StatelessSession;

public class HibernateHelper extends HelperBase {

	public HibernateHelper(ApplicationManager manager) {
		super(manager);
	}

	public String getUserId(String login) {
		StatelessSession session = HibernateUtil.getSessionFactory().openStatelessSession();
		session.beginTransaction();
		return session.createQuery("SELECT id FROM User where login=?").setParameter(0, login).uniqueResult().toString();
	}

}
